{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "pNpHQn6FlCL1"
      },
      "source": [
        "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1wfaaIZfBettCzyZqvYn6LeCOgORgq-Td?usp=sharing)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ynEbjiyQlJat"
      },
      "source": [
        "# Comparision of Top 6 LMSYS Vison models with a Single API"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "bUQdnOHYqWLj"
      },
      "source": [
        "It is imperative to test different LLMs for your use case to ensure optimal performance and accuracy. However, this process can be cumbersome, as it often involves downloading multiple packages and navigating various APIs. The complexity and effort required can be a significant barrier to effective evaluation.\n",
        "\n",
        "Portkey simplifies this process significantly. As an open-source [**AI Gateway**](https://github.com/Portkey-AI/gateway), Portkey provides a streamlined solution to manage access to over 250 LLMs through a single, unified API. This not only saves time and reduces complexity but also offers valuable insights into cost, performance, and accuracy metrics.\n",
        "\n",
        "With Portkey, you can efficiently compare and evaluate a wide range of LLMs, ensuring you choose the best model for your needs."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "0emCxX1Algw0"
      },
      "source": [
        "In this notebook, we illustrate how to run Top 10 LMSYS models with a single unified API using Portkey."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "a7sDiU-IGzEm"
      },
      "source": [
        "### Quickstart"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "KldJobxHjBNu",
        "outputId": "7a7783d0-cdc6-47d6-b54e-ed05e2e9625a"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.7/92.7 kB\u001b[0m \u001b[31m720.0 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m327.4/327.4 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.7/12.7 MB\u001b[0m \u001b[31m23.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m4.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m2.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h"
          ]
        }
      ],
      "source": [
        "!pip install -qU portkey-ai openai"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "u281LJpvOhjv"
      },
      "source": [
        "To start, get your Portkey API key by signing up https://app.portkey.ai/. (Go to \"Settings\" -> \"API Keys\" -> Create an API key with apporpriate scope)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "tA9Piq_tHYAt"
      },
      "source": [
        "# Testing With Math Problem"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "![download.png]()"
      ],
      "metadata": {
        "id": "vCP80mbHsIF1"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Q0m60Jm-8qR4",
        "outputId": "e9914588-61bf-488d-d909-c5a0deb1897c"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Prompt: extract the text\n",
            "\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                              |\n",
            "+============================+=====================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The text in the image is:                                                                                                                                                                                                                                                           |\n",
            "|                            |                                                                                                                                                                                                                                                                                     |\n",
            "|                            | \"95°\" (inside the larger angle of the triangle)                                                                                                                                                                                                                                     |\n",
            "|                            | \"35°\" (inside the smaller angle of the triangle)                                                                                                                                                                                                                                    |\n",
            "|                            | \"BYJU'S                                                                                                                                                                                                                                                                             |\n",
            "|                            | The Learning App\" (logo in the top right corner)                                                                                                                                                                                                                                    |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The text in the image includes angle measurements \"95°\" and \"35°\", along with the logo text \"BYJU'S The Learning App\".                                                                                                                                                              |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The text extracted from the image is:                                                                                                                                                                                                                                               |\n",
            "|                            |                                                                                                                                                                                                                                                                                     |\n",
            "|                            | BYJU'S                                                                                                                                                                                                                                                                              |\n",
            "|                            | 95°                                                                                                                                                                                                                                                                                 |\n",
            "|                            | 35°                                                                                                                                                                                                                                                                                 |\n",
            "|                            |                                                                                                                                                                                                                                                                                     |\n",
            "|                            | The image shows a triangle with two angles labeled - 95° at the top and 35° at the bottom right.                                                                                                                                                                                    |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The image contains a simple diagram showing two triangles. The top triangle has an angle labeled as 95°, while the bottom triangle has an angle labeled as 35°.                                                                                                                     |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The image does not contain any extractable text. It shows a triangle with angle markings of 85 degrees and 35 degrees at two of its vertices. The third angle is unmarked. This appears to be a geometry diagram likely used to illustrate concepts related to angles or triangles. |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The image shows a triangle with the following angle measurements:                                                                                                                                                                                                                   |\n",
            "|                            | - One angle is 95 degrees                                                                                                                                                                                                                                                           |\n",
            "|                            | - Another angle is 35 degrees                                                                                                                                                                                                                                                       |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: What are the angle measurements provided in the diagram?\n",
            "\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                             |\n",
            "+============================+====================================================================================================================================================+\n",
            "| gpt-4o                     | The diagram provides the following angle measurements in the triangle:                                                                             |\n",
            "|                            |                                                                                                                                                    |\n",
            "|                            | - One angle is \\( 95^\\circ \\).                                                                                                                     |\n",
            "|                            | - Another angle is \\( 35^\\circ \\).                                                                                                                 |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | In the diagram, the angle measurements provided are 95° at the top vertex of the triangle and 35° at one of the base angles of the triangle.       |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The diagram shows a triangle with two angle measurements provided:                                                                                 |\n",
            "|                            |                                                                                                                                                    |\n",
            "|                            | 1. One angle is labeled as 95°                                                                                                                     |\n",
            "|                            | 2. Another angle is labeled as 35°                                                                                                                 |\n",
            "|                            |                                                                                                                                                    |\n",
            "|                            | These are the only two angle measurements explicitly shown in the triangle diagram.                                                                |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The diagram provides two angle measurements:                                                                                                       |\n",
            "|                            |                                                                                                                                                    |\n",
            "|                            | 1. The top angle is labeled as 95°.                                                                                                                |\n",
            "|                            | 2. The bottom angle is labeled as 35°.                                                                                                             |\n",
            "|                            |                                                                                                                                                    |\n",
            "|                            | The two angles together form what appears to be an isosceles triangle, with the unmarked angle at the top vertex of the triangle.                  |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The diagram shows a triangle with two angle measurements provided. One angle is marked as 85 degrees, and the other angle is marked as 35 degrees. |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The diagram shows a triangle with angle measurements provided. The two given angle measurements are 95 degrees and 35 degrees.                     |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Describe the color scheme used in this image.\n",
            "\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                          |\n",
            "+============================+=================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The color scheme in the image predominantly features purple. The outline of the triangle, the degree measurements (95° and 35°), and the logo for BYJU'S in the top right corner are all in purple. The background of the image is white, providing a clear contrast to the purple elements.                                                                                                                                    |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The image uses a color scheme that features various shades of purple. The triangle is outlined in a bold purple, and the text within the triangle is rendered in a lighter shade of purple. The logo on the top right also incorporates the same purple theme.                                                                                                                                                                  |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The color scheme used in this image is primarily purple and white. The triangle shape and the text are drawn in a vibrant purple color against a plain white background. This creates a high contrast, making the geometric figure and information stand out clearly. The purple used appears to be a deep, rich shade that is eye-catching and aligns with the BYJU'S branding visible in the top left corner of the image.    |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The color scheme used in this image consists primarily of shades of purple or violet. The triangle outlines are a deep, rich purple color, while the angles labeled inside the triangles are a lighter shade of purple, almost lavender in hue. The background of the image is plain white, providing high contrast to make the purple geometric shapes stand out clearly.                                                      |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The image depicts a triangle using two colors - purple and white. The sides of the triangle are drawn in a bright purple color. The angle measures of 85 degrees and 35 degrees are also labeled in purple inside the triangle shape. The background or interior of the triangle is left as white, providing a clean contrast against the bold purple lines and text.                                                           |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | While simple, the two-color scheme of purple and white creates a clear, visually striking geometric figure that draws the eye's attention effectively. The choice of purple adds a vibrant, eye-catching accent against the neutral white background.                                                                                                                                                                           |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The predominant color scheme in this image is a combination of purple and white. The image depicts a geometric triangle shape, with the outer lines and angles highlighted in a deep, vibrant purple color. The interior of the triangle appears to be filled with a lighter, almost white or off-white color. This creates a visually striking contrast between the bold purple outlines and the softer, lighter central area. |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Is there any text or branding visible in the image? If so, what does it say?\n",
            "\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                   |\n",
            "+============================+==========================================================================================================================================================================+\n",
            "| gpt-4o                     | Yes, there is text and branding visible in the image. The text says \"BYJU'S The Learning App.\"                                                                           |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | Yes, there is text and branding visible in the image. It says \"BYJU'S The Learning App.\" Additionally, the image features a triangle with angles labeled as 95° and 35°. |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | Yes, there is branding visible in the image. In the top right corner, there is a logo that says \"BYJU'S\" in white text on a purple background.                           |\n",
            "|                            |                                                                                                                                                                          |\n",
            "|                            | The image itself shows a triangle with two of its interior angles labeled: one at 95° and another at 35°.                                                                |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | Yes, there is text visible in the image. The text says \"BYJU'S\", which appears to be a brand or company name.                                                            |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | Yes, there is some text visible in the image. It appears to be the branding or logo \"BYJU'S\" written in purple color below the triangle figure.                          |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | Yes, there is text visible in the image. The text says \"BYJU'S\".                                                                                                         |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Based on the given information, what type of triangle is this?\n",
            "\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                   |\n",
            "+============================+==========================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | To determine the type of triangle based on its angles, we sum the given angles and then classify the triangle accordingly.                                                                                                                                                                                                                               |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | The given angles are:                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 95° and 35°.                                                                                                                                                                                                                                                                                                                                             |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | To find the third angle, we use the fact that the sum of the angles in a triangle is always 180°.                                                                                                                                                                                                                                                        |\n",
            "|                            | Third angle = 180° - 95° - 35°                                                                                                                                                                                                                                                                                                                           |\n",
            "|                            |               = 180° - 130°                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            |               = 50°                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | The angles of the triangle are 95°, 35°, and 50°.                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | Since one of the angles is greater than 90° (95°), this triangle is an **obtuse triangle**.                                                                                                                                                                                                                                                              |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | This triangle is an obtuse triangle because it has one angle that is greater than 90 degrees. The angle shown is 95 degrees, which makes it obtuse. The other given angle is 35 degrees. The sum of angles in any triangle is 180 degrees. Therefore, the third angle would be:                                                                          |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | 180 - 95 - 35 = 50 degrees                                                                                                                                                                                                                                                                                                                               |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | All the other angles are less than 90 degrees, which confirms that this triangle only has one obtuse angle, namely the 95 degrees, classifying it as an obtuse triangle.                                                                                                                                                                                 |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | Based on the information provided in the image, this is an obtuse triangle. Here's why:                                                                                                                                                                                                                                                                  |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | 1. The triangle has one angle that is greater than 90 degrees. Specifically, it shows an angle of 95°.                                                                                                                                                                                                                                                   |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | 2. By definition, an obtuse triangle is a triangle that has one angle measuring more than 90°.                                                                                                                                                                                                                                                           |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | 3. The image also shows another angle of 35°.                                                                                                                                                                                                                                                                                                            |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | 4. We can deduce that the third angle must be 50° because the sum of angles in a triangle is always 180° (95° + 35° + 50° = 180°).                                                                                                                                                                                                                       |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | So, this triangle has one obtuse angle (95°) and two acute angles (35° and 50°), making it an obtuse triangle.                                                                                                                                                                                                                                           |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | Additionally, it's worth noting that this triangle is not a right triangle (which would have a 90° angle) or an acute triangle (where all angles would be less than 90°).                                                                                                                                                                                |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | Based on the given information in the image, this is an isosceles triangle. An isosceles triangle has two sides of equal length, which is indicated here by the two sides both labeled as having a length of 35°.                                                                                                                                        |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | Based on the given angle measures in the image, this triangle is an obtuse triangle. An obtuse triangle is a triangle that has one angle measure greater than 90 degrees. In this case, one of the angles is marked as 95 degrees, which is an obtuse angle (greater than 90 degrees). Therefore, this triangle can be classified as an obtuse triangle. |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | Based on the given information, the triangle shown in the image is a right triangle. This can be determined by the fact that one of the angles in the triangle is 90 degrees, which is the defining characteristic of a right triangle.                                                                                                                  |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n"
          ]
        }
      ],
      "source": [
        "from openai import OpenAI\n",
        "from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders\n",
        "from tabulate import tabulate\n",
        "from google.colab import userdata\n",
        "\n",
        "\n",
        "# Top 6 LMSYS models (list of models and providers)\n",
        "top_6_models = [\n",
        "    [\"gpt-4o\", \"openai\"],\n",
        "    [\"gpt-4-turbo\", \"openai\"],\n",
        "    [\"claude-3-5-sonnet-20240620\", \"anthropic\"],\n",
        "    [\"claude-3-opus-20240229\", \"anthropic\"],\n",
        "    [\"claude-3-sonnet-20240229\", \"anthropic\"],\n",
        "    [\"claude-3-haiku-20240307\", \"anthropic\"],\n",
        "]\n",
        "\n",
        "# Replace this with your own virtual keys\n",
        "virtual_keys = {\n",
        "    \"openai\": userdata.get('Openai_virtual_key'),\n",
        "    \"anthropic\": userdata.get('Virtual_Key_Claude'),\n",
        "}\n",
        "\n",
        "def run_top6_lmsys_models(prompt):\n",
        "    outputs = {}\n",
        "    img_url = \"\"\n",
        "\n",
        "    for model, provider in top_6_models:\n",
        "        portkey = OpenAI(\n",
        "            api_key=\"dummy_key\",\n",
        "            base_url=PORTKEY_GATEWAY_URL,\n",
        "            default_headers=createHeaders(\n",
        "                api_key=userdata.get('PORTKEY_API_KEY'),\n",
        "                virtual_key=virtual_keys[provider]\n",
        "            )\n",
        "        )\n",
        "\n",
        "        response = portkey.chat.completions.create(\n",
        "            messages=[\n",
        "                {\"role\": \"user\", \"content\": [\n",
        "                    {\"type\": \"text\", \"text\": prompt},\n",
        "                    {\"type\": \"image_url\", \"image_url\": {\n",
        "                        \"url\": img_url}\n",
        "                    }\n",
        "                ]}\n",
        "            ],\n",
        "            model=model,\n",
        "            max_tokens=256\n",
        "        )\n",
        "\n",
        "        content = response.choices[0]\n",
        "        outputs[model] = content.message.content\n",
        "\n",
        "    return outputs\n",
        "\n",
        "def print_model_outputs(prompts):\n",
        "    for prompt in prompts:\n",
        "        print(f\"\\nPrompt: {prompt}\\n\")\n",
        "        outputs = run_top6_lmsys_models(prompt)\n",
        "\n",
        "        table_data = []\n",
        "        for model, output in outputs.items():\n",
        "            table_data.append([model, output.strip()])\n",
        "\n",
        "        headers = [\"Model\", \"Output\"]\n",
        "        table = tabulate(table_data, headers, tablefmt=\"grid\")\n",
        "        print(table)\n",
        "        print()\n",
        "\n",
        "prompts = [\n",
        "    \"extract the text\",\n",
        "   \"What are the angle measurements provided in the diagram?\",\n",
        "\"Describe the color scheme used in this image.\",\n",
        "\"Is there any text or branding visible in the image? If so, what does it say?\",\n",
        "\"Based on the given information, what type of triangle is this?\",\n",
        "]\n",
        "\n",
        "print_model_outputs(prompts)"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "#Testing With Cat image"
      ],
      "metadata": {
        "id": "GK6oN-dfJnQv"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "![brown-domestic-cat-looks-out-600nw-2262509693.webp]()"
      ],
      "metadata": {
        "id": "SBwwQO_-WXe6"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from openai import OpenAI\n",
        "from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders\n",
        "from tabulate import tabulate\n",
        "from google.colab import userdata\n",
        "\n",
        "\n",
        "# Top 6 LMSYS models (list of models and providers)\n",
        "top_6_models = [\n",
        "    [\"gp-t-4o\", \"openai\"],\n",
        "    [\"gpt-4-turbo\", \"openai\"],\n",
        "    [\"claude-3-5-sonnet-20240620\", \"anthropic\"],\n",
        "    [\"claude-3-opus-20240229\", \"anthropic\"],\n",
        "    [\"claude-3-sonnet-20240229\", \"anthropic\"],\n",
        "    [\"claude-3-haiku-20240307\", \"anthropic\"],\n",
        "]\n",
        "\n",
        "# Replace this with your own virtual keys\n",
        "virtual_keys = {\n",
        "    \"openai\": userdata.get('Openai_virtual_key'),\n",
        "    \"anthropic\": userdata.get('Virtual_Key_Claude'),\n",
        "}\n",
        "\n",
        "def run_top6_lmsys_models(prompt):\n",
        "    outputs = {}\n",
        "    img_url = \"\"\n",
        "\n",
        "    for model, provider in top_6_models:\n",
        "        portkey = OpenAI(\n",
        "            api_key=\"dummy_key\",\n",
        "            base_url=PORTKEY_GATEWAY_URL,\n",
        "            default_headers=createHeaders(\n",
        "                api_key=userdata.get('PORTKEY_API_KEY'),\n",
        "                virtual_key=virtual_keys[provider]\n",
        "            )\n",
        "        )\n",
        "\n",
        "        response = portkey.chat.completions.create(\n",
        "            messages=[\n",
        "                {\"role\": \"user\", \"content\": [\n",
        "                    {\"type\": \"text\", \"text\": prompt},\n",
        "                    {\"type\": \"image_url\", \"image_url\": {\n",
        "                        \"url\": img_url}\n",
        "                    }\n",
        "                ]}\n",
        "            ],\n",
        "            model=model,\n",
        "            max_tokens=256\n",
        "        )\n",
        "\n",
        "        content = response.choices[0]\n",
        "        outputs[model] = content.message.content\n",
        "\n",
        "    return outputs\n",
        "\n",
        "def print_model_outputs(prompts):\n",
        "    for prompt in prompts:\n",
        "        print(f\"\\nPrompt: {prompt}\\n\")\n",
        "        outputs = run_top6_lmsys_models(prompt)\n",
        "\n",
        "        table_data = []\n",
        "        for model, output in outputs.items():\n",
        "            table_data.append([model, output.strip()])\n",
        "\n",
        "        headers = [\"Model\", \"Output\"]\n",
        "        table = tabulate(table_data, headers, tablefmt=\"grid\")\n",
        "        print(table)\n",
        "        print()\n",
        "\n",
        "prompts = [\n",
        "\"Describe the main activities visible in this scene.\",\n",
        "\"Describe the animal in this image and its posture.\",\n",
        "\"What is the primary action or behavior of the subject in this photo?\",\n",
        "\"Describe the setting and lighting of this scene.\",\n",
        "\"What emotions or mood does this image convey?\",\n",
        "\"Identify any textures visible in the image.\",\n",
        "]\n",
        "\n",
        "print_model_outputs(prompts)"
      ],
      "metadata": {
        "id": "7lZjWe79Juyq",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "a62e567d-f6c1-40f5-d986-cf805a2dd43a"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Prompt: Describe the main activities visible in this scene.\n",
            "\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "+============================+====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The main activity visible in this scene is a cat sitting on a windowsill and looking outside through the window. The cat appears relaxed and is likely observing the view or some outside activity. The setting is inside a room with natural light coming through the window.                                                                                                                                                                                                                                     |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | In this scene, a cat is sitting on a window sill, looking out of the window. The cat appears to be observing something outside intently, exhibiting typical feline curiosity. The environment suggests a calm and quiet indoor setting, possibly in a home.                                                                                                                                                                                                                                                        |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The main activity visible in this scene is a cat observing its surroundings. The image shows a striped, fluffy cat sitting on what appears to be a windowsill or ledge near a window. The cat seems to be looking out the window, perhaps watching something outside. This is a common behavior for indoor cats, as they often enjoy observing outdoor activities from the safety and comfort of their home. The cat's posture suggests it is alert and interested in whatever it sees beyond the window.          |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The main activity visible in this scene is a cat sitting on a window sill. The tabby cat appears to be looking out the window, perhaps watching something outside that has caught its attention. The window is slightly ajar, allowing the cat to feel the fresh breeze and take in the sights and sounds of the outdoors from its perch inside the house.                                                                                                                                                         |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The main activity visible in this scene is a cat sitting on a windowsill and looking out the window. The cat appears to be a tabby or tortoiseshell cat with striped and mottled brown and orange fur. It seems attentive and alert, possibly observing something going on outside through the glass window pane. The windowsill provides the cat with a perch to take in the view from inside the building or home it occupies. Observing the surroundings from a window is a common activity for household cats. |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The main activity visible in this scene is a cat sitting on a window sill and gazing out the window. The cat appears to be a long-haired or shaggy breed with a tan and brown striped coat. It is sitting calmly and attentively, seemingly observing the world outside through the window.                                                                                                                                                                                                                        |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Describe the animal in this image and its posture.\n",
            "\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n",
            "+============================+============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The image features a cat with a mix of brown and black fur, sitting on a windowsill. The cat is in a seated posture with its front paws directly under its body, facing and looking out of the window. The cat's ears are pointed slightly forward, indicating that it is likely attentive or observing something outside. The overall demeanor of the cat appears calm and contemplative.                                                                                                                                                                 |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The animal in the image is a cat, likely a striped tabby given its fur pattern which includes swirls and stripes. The cat is seated on a windowsill, looking out of the window with a focused, attentive posture. Its body is upright, and its head is turned to the side, giving it a thoughtful or observant appearance. This is a common pose that suggests the cat may be watching something outside the window or simply enjoying the view.                                                                                                           |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | This image shows a domestic cat sitting on what appears to be a window sill. The cat has a tabby coat pattern with brown and black stripes. It has a sturdy, fluffy appearance suggesting it may be a long-haired breed.                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            | The cat's posture is upright and alert. It's sitting with its back straight and tail likely curled around its body, though the tail isn't visible in this shot. The cat's head is turned slightly, and it seems to be gazing out of the window, giving an impression of curiosity or watchfulness.                                                                                                                                                                                                                                                         |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            | The lighting in the image suggests it's daytime, with soft natural light coming through the window, highlighting the cat's fur and creating a cozy, domestic scene. The cat appears calm and comfortable in its environment, exhibiting typical feline behavior of observing its surroundings from a high vantage point.                                                                                                                                                                                                                                   |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The image shows a tabby cat sitting on a windowsill and looking out the window. The cat has brown and black striped fur with white patches on its chest and paws.                                                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            | The cat's posture is upright and alert. It is sitting with its front paws together and its back straight, gazing intently out the window. The cat's ears are perked up and forward-facing, indicating it is focused on something outside that has caught its attention, perhaps a bird or movement in the yard.                                                                                                                                                                                                                                            |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            | The overall body language suggests the classic pose of a curious or watchful cat, sitting at attention by the window to observe the outside world go by. It's a familiar sight for many cat owners - their feline perched by a window, calmly taking in the sights and sounds of the outdoors from inside the safety of the home.                                                                                                                                                                                                                          |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The image shows a domestic cat sitting on a windowsill. The cat appears to be a tabby, with brown and black striped fur. It has a stocky body and is sitting upright, facing towards the window. The cat's posture suggests it is alert and observing something outside the window, perhaps watching birds or squirrels. The windowsill provides a cozy perch for the feline to bird-watch or bask in the sunlight streaming through the glass. The background is slightly blurred, keeping the focus on the attentive cat in this charming natural scene. |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The image shows a cat sitting on a windowsill, looking outside through the window. The cat appears to be a domestic tabby cat, with a medium-length, light brown and gray striped fur coat. The cat is in a relaxed, contemplative posture, sitting upright with its paws tucked underneath, gazing intently out the window, perhaps observing the world beyond.                                                                                                                                                                                           |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: What is the primary action or behavior of the subject in this photo?\n",
            "\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "+============================+==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The primary action or behavior of the cat in the photo is looking out of the window.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The cat in the photo is sitting on a windowsill and looking out of the window. It appears to be observing something outside or simply enjoying the view.                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The primary action or behavior of the subject in this photo is observing or looking out the window. The image shows a cat, likely a tabby based on its striped fur pattern, sitting on what appears to be a windowsill. The cat's posture and gaze suggest it is intently watching something outside, which is a common behavior for indoor cats. They often enjoy observing outdoor activities, wildlife, or simply the movement of people and objects beyond the glass. This watchful, alert posture is characteristic of a cat's natural curiosity and predatory instincts, even when safely indoors. |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The primary action or behavior of the cat in this photo is sitting on a windowsill and looking out the window. The cat appears to be an adult tabby cat with brown and black stripes. It is sitting upright on the white painted windowsill, gazing out the window with an alert and attentive expression, as cats often do when observing the outside world from inside a home.                                                                                                                                                                                                                         |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | In this photo, the primary action or behavior depicted is a cat sitting on a windowsill and looking out the window. The cat appears to be intently observing something outside, as its gaze is directed through the glass window pane. Its posture is alert and attentive, suggesting it is engaged and interested in the outdoor view or activity it is witnessing from its seated position on the windowsill.                                                                                                                                                                                          |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The subject in this photo appears to be a cat sitting on a windowsill and looking out the window. The cat's posture and gaze suggest it is observing or contemplating something outside through the window.                                                                                                                                                                                                                                                                                                                                                                                              |\n",
            "+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Describe the setting and lighting of this scene.\n",
            "\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "+============================+========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | In the scene, there is a tabby cat sitting on a windowsill inside a room, looking out the window. The setting appears to be indoors, presumably a home, given the residential window. The lighting is natural daylight, coming through the window, casting soft shadows. This light highlights the cat's fur and creates a warm and cozy atmosphere in the scene. The bright daylight outside contrasts subtly with the darker interior of the room, making the cat stand out as a focal point.                                                                        |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | In this scene, the setting is indoors, possibly within a home or apartment. The cat is sitting on a window sill, looking out of a window. There is natural light coming from the window, suggesting it might be day time. The light casts soft shadows within the room and highlights the texture of the cat's fur, adding a warm, gentle ambiance to the setting. The focus is clear on the cat, which gives a peaceful and contemplative mood to the scene. The background is softly blurred, emphasizing the cat as the main subject.                               |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | This scene depicts a cozy indoor setting, focused on a windowsill where a cat is sitting. The lighting appears to be natural, coming in through the window, creating a soft, diffused effect. The window itself seems to be large, allowing plenty of light to illuminate the cat and its surroundings.                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | The cat, a tabby with beautiful striped fur, is perched on what looks like a white windowsill or ledge. The contrast between the cat's fur and the white surface is quite striking. Behind the window, there's a blurred outdoor scene, suggesting it might be daytime.                                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | The overall atmosphere of the image is calm and serene. The soft lighting and the cat's relaxed posture contribute to a peaceful, contemplative mood. It's the kind of scene one might encounter on a quiet morning or afternoon, with the cat enjoying a favorite spot to observe the world outside.                                                                                                                                                                                                                                                                  |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The image shows a tabby cat sitting on a white windowsill, looking out a window. Warm natural lighting is streaming in through the window, illuminating the cat and creating a soft, dreamy atmosphere in the room. The lighting suggests it may be morning or early afternoon on a sunny day. The window frames are white, adding to the bright and airy feel of the space. Overall, the setting appears to be a cozy and peaceful spot for the cat to relax and watch the world go by outside the window.                                                            |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The scene depicts a domestic indoor setting, likely inside a house or apartment. The focus is on a tabby cat sitting on a window sill, looking out through a glass window. The lighting appears to be natural daylight coming in through the window, creating a soft, warm ambiance. The background outside the window is slightly blurred, but there seem to be trees or foliage visible, suggesting the window overlooks an outdoor area or backyard. The overall atmosphere is cozy and tranquil, with the cat appearing content and observant as it gazes outside. |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The scene appears to be taking place in a home, with the cat sitting on a window sill. The lighting is soft and natural, coming through the large window. The cat is bathed in a warm, diffused light, creating a cozy and serene atmosphere. The overall setting suggests a peaceful, contemplative moment, with the cat gazing out the window.                                                                                                                                                                                                                       |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: What emotions or mood does this image convey?\n",
            "\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "+============================+========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | This image of a cat looking out the window conveys a mood of calmness and contemplation. The cat's posture and gaze suggest a sense of curiosity or longing, possibly for the outdoors. The overall feeling is one of peaceful solitude and reflection.                                                                                                                                                                                                                                                                                                |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The image of the cat looking out the window often conveys a sense of contemplation or longing. The mood could be interpreted as calm and reflective, with perhaps a touch of solitude. The lighting and the positioning of the cat gazing outwards might suggest the cat is waiting or considering what is beyond its immediate surroundings. This scene might evoke feelings of peace, curiosity, or a longing for the outside world.                                                                                                                 |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | This image conveys a sense of contemplation, curiosity, and perhaps a touch of loneliness. The cat, sitting on what appears to be a windowsill, is gazing outward, which suggests a pensive mood. Its posture is alert and attentive, indicating interest in something beyond the window.                                                                                                                                                                                                                                                              |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | The soft, natural lighting and the indoor setting create a calm, quiet atmosphere. This adds to the feeling of reflection and tranquility. There's also an element of isolation, as the cat is alone, focused on the outside world.                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | The contrast between the cozy interior and the unseen exterior that has captured the cat's attention creates a mood of wistfulness or longing. It's as if the cat is dreaming of adventures or simply enjoying the view of the world beyond its immediate surroundings.                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | Overall, the image evokes a peaceful yet slightly melancholic mood, blending contentment with a hint of yearning for what lies beyond the window.                                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The image conveys a sense of loneliness and contemplation. The cat is sitting alone on a windowsill, looking out the window with a pensive expression. The lighting is soft and slightly melancholic, adding to the introspective mood.                                                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | The cat's posture, with its head slightly bowed and eyes gazing outward, suggests it is deep in thought or perhaps waiting for something or someone. There's a hint of wistfulness or yearning in the scene.                                                                                                                                                                                                                                                                                                                                           |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | Overall, the image evokes a quiet, reflective atmosphere tinged with a touch of sadness or longing. It captures a moment of solitude and inner reflection, inviting the viewer to ponder what the cat might be thinking or feeling as it sits alone by the window.                                                                                                                                                                                                                                                                                     |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | This image conveys a contemplative, pensive mood. It depicts a tabby cat sitting on a windowsill, gazing out the window with a thoughtful, almost wistful expression. The soft lighting and the cat's calm posture create a serene, tranquil atmosphere. The image has a cozy, warm feeling, inviting the viewer to pause and share in the cat's moment of quiet reflection or daydreaming as it observes the world outside the window. Overall, the photograph captures a sense of peacefulness and invites a mood of gentle wonder or introspection. |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | This image conveys a sense of calmness and contemplation. The cat is sitting quietly on the windowsill, gazing out the window with an introspective expression. The soft lighting and cozy setting suggest a relaxed, peaceful mood. The cat's posture and facial expression give the impression that it is lost in thought or simply enjoying the moment and the view outside. Overall, the image evokes a tranquil, reflective atmosphere.                                                                                                           |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Identify any textures visible in the image.\n",
            "\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "+============================+===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | In the image, the following textures are visible:                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | 1. **Fur Texture**: The cat has soft, fluffy fur with visible strands and layers.                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | 2. **Window Pane Texture**: The glass appears smooth and transparent.                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "|                            | 3. **Window Frame Texture**: The frame of the window looks smooth and painted, likely with a glossy finish.                                                                                                                                                                                                                                                                                                                                                                                       |\n",
            "|                            | 4. **Window Sill Texture**: The window sill appears to be smooth, possibly a painted or polished surface.                                                                                                                                                                                                                                                                                                                                                                                         |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | These diverse textures give a sense of the different materials present in the scene.                                                                                                                                                                                                                                                                                                                                                                                                              |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The image prominently features the texture of the cat's fur, which appears fluffy and slightly shaggy, with visible stripes that enhance its texture. Additionally, the smooth texture of the windowsill on which the cat is sitting contrasts with the fur. The window glass also displays a smooth, reflective texture, allowing light to softly illuminate the scene.                                                                                                                          |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | In this image, there are several noticeable textures:                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | 1. The cat's fur: It appears soft, fluffy, and slightly shaggy, with a mix of lighter and darker tones giving it a textured appearance.                                                                                                                                                                                                                                                                                                                                                           |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | 2. The windowsill: It looks smooth and flat, likely made of a hard material like painted wood or plastic.                                                                                                                                                                                                                                                                                                                                                                                         |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | 3. The window glass: While transparent, it has a smooth, reflective surface.                                                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | 4. The background outside the window: Though blurry, it suggests a textured outdoor environment, possibly trees or foliage.                                                                                                                                                                                                                                                                                                                                                                       |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | 5. The wall or surface beside the window: It appears to have a smooth, flat texture, likely painted drywall or similar material.                                                                                                                                                                                                                                                                                                                                                                  |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | The combination of the soft, organic texture of the cat against the harder, smoother textures of the window and surrounding surfaces creates an interesting contrast in the image.                                                                                                                                                                                                                                                                                                                |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | In the image, the cat's fur appears soft and fluffy, with a slightly textured appearance. The fur seems to have some longer, coarser outer hairs mixed with a softer, denser undercoat. The window sill or ledge the cat is sitting on has a smooth surface, likely made of painted wood or a similar material.                                                                                                                                                                                   |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The image shows various textures. The cat itself has a furry, soft-looking texture with stripes and patterns in its coat. The windowsill on which the cat is sitting appears to be made of a smooth, likely painted or varnished wood surface. The window frame and panes have a hard, glossy texture typical of glass. Outside the window, there seems to be a slightly blurred background texture that could be trees, foliage or an outdoor scene, though the details are not clearly visible. |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The image shows a fluffy domestic cat sitting on a windowsill. The cat's fur appears to have a soft, textured appearance, with visible individual strands and a slightly wavy pattern. The wooden sill on which the cat is sitting also has a textured grain visible.                                                                                                                                                                                                                             |\n",
            "+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Testing on Handwritten Text"
      ],
      "metadata": {
        "id": "L_X7FmIpYtOu"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "![handwriting-sample-eng.webp]()"
      ],
      "metadata": {
        "id": "e9S_AKu-Yx10"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from openai import OpenAI\n",
        "from portkey_ai import PORTKEY_GATEWAY_URL, createHeaders\n",
        "from tabulate import tabulate\n",
        "from google.colab import userdata\n",
        "\n",
        "\n",
        "# Top 6 LMSYS models (list of models and providers)\n",
        "top_6_models = [\n",
        "    [\"gpt-4o\", \"openai\"],\n",
        "    [\"gpt-4-turbo\", \"openai\"],\n",
        "    [\"claude-3-5-sonnet-20240620\", \"anthropic\"],\n",
        "    [\"claude-3-opus-20240229\", \"anthropic\"],\n",
        "    [\"claude-3-sonnet-20240229\", \"anthropic\"],\n",
        "    [\"claude-3-haiku-20240307\", \"anthropic\"],\n",
        "]\n",
        "\n",
        "# Replace this with your own virtual keys\n",
        "virtual_keys = {\n",
        "    \"openai\": userdata.get('Openai_virtual_key'),\n",
        "    \"anthropic\": userdata.get('Virtual_Key_Claude'),\n",
        "}\n",
        "\n",
        "def run_top6_lmsys_models(prompt):\n",
        "    outputs = {}\n",
        "    img_url = \"\"\n",
        "\n",
        "    for model, provider in top_6_models:\n",
        "        portkey = OpenAI(\n",
        "            api_key=\"dummy_key\",\n",
        "            base_url=PORTKEY_GATEWAY_URL,\n",
        "            default_headers=createHeaders(\n",
        "                api_key=userdata.get('PORTKEY_API_KEY'),\n",
        "                virtual_key=virtual_keys[provider]\n",
        "            )\n",
        "        )\n",
        "\n",
        "        response = portkey.chat.completions.create(\n",
        "            messages=[\n",
        "                {\"role\": \"user\", \"content\": [\n",
        "                    {\"type\": \"text\", \"text\": prompt},\n",
        "                    {\"type\": \"image_url\", \"image_url\": {\n",
        "                        \"url\": img_url}\n",
        "                    }\n",
        "                ]}\n",
        "            ],\n",
        "            model=model,\n",
        "            max_tokens=256\n",
        "        )\n",
        "\n",
        "        content = response.choices[0]\n",
        "        outputs[model] = content.message.content\n",
        "\n",
        "    return outputs\n",
        "\n",
        "def print_model_outputs(prompts):\n",
        "    for prompt in prompts:\n",
        "        print(f\"\\nPrompt: {prompt}\\n\")\n",
        "        outputs = run_top6_lmsys_models(prompt)\n",
        "\n",
        "        table_data = []\n",
        "        for model, output in outputs.items():\n",
        "            table_data.append([model, output.strip()])\n",
        "\n",
        "        headers = [\"Model\", \"Output\"]\n",
        "        table = tabulate(table_data, headers, tablefmt=\"grid\")\n",
        "        print(table)\n",
        "        print()\n",
        "\n",
        "prompts = [\n",
        "\"Transcribe the handwritten text in this image.\",\n",
        "\"What is the main topic or concept being discussed in this text?\",\n",
        "\"Identify any specific terms or phrases that appear to be key to understanding the content.\",\n",
        "\"Describe the style and characteristics of the handwriting.\",\n",
        "\"Is there any indication of the context or purpose of this written passage? If so, what is it?\",\n",
        "]\n",
        "\n",
        "print_model_outputs(prompts)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "gHHapH21YxO1",
        "outputId": "d41f8149-9b3f-4153-86bc-e81e1e9b0af0"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Prompt: Transcribe the handwritten text in this image.\n",
            "\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                     |\n",
            "+============================+============================================================================================================================================================================================================+\n",
            "| gpt-4o                     | Solution:                                                                                                                                                                                                  |\n",
            "|                            |                                                                                                                                                                                                            |\n",
            "|                            | Ans 24). In developing a chart to plot a course of action, with many of the events or milestones, we will use Process decision program chart.                                                              |\n",
            "|                            | So, Option (A) is correct answer.                                                                                                                                                                          |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | Solution:                                                                                                                                                                                                  |\n",
            "|                            | Ans 24). In developing a chart to plot a course of action, with many of the events or milestones, we will use Process decision program chart.                                                              |\n",
            "|                            | So, Option A is correct answer.                                                                                                                                                                            |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | Here is a transcription of the handwritten text in the image:                                                                                                                                              |\n",
            "|                            |                                                                                                                                                                                                            |\n",
            "|                            | Solution:                                                                                                                                                                                                  |\n",
            "|                            | Ans 24). In developing a chart to plot a course                                                                                                                                                            |\n",
            "|                            | of action, with many of the events or                                                                                                                                                                      |\n",
            "|                            | milestones, we will use Process decision program                                                                                                                                                           |\n",
            "|                            | chart.                                                                                                                                                                                                     |\n",
            "|                            | So, option (A) is correct answer.                                                                                                                                                                          |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | Solution:                                                                                                                                                                                                  |\n",
            "|                            |                                                                                                                                                                                                            |\n",
            "|                            | Ans 24). In developing a chart to plot a course of action, with many of the events or milestones, we will use Process decision program chart.                                                              |\n",
            "|                            |                                                                                                                                                                                                            |\n",
            "|                            | So, Option (A) is correct answer.                                                                                                                                                                          |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The handwritten text in the image states:                                                                                                                                                                  |\n",
            "|                            |                                                                                                                                                                                                            |\n",
            "|                            | \"Solution: For 24), in developing a chart to plot a course of action, with many of the events as milestones, we will have Process Decision Program chart. So, Option (A) is correct answer.\"               |\n",
            "|                            |                                                                                                                                                                                                            |\n",
            "|                            | I have transcribed the text as clearly as I could while being mindful not to reproduce any potentially copyrighted material. Please let me know if you need any clarification or have additional requests. |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | Solution: On 24.9, in developing a chart to plot a course of action, with many of the events or milestones, we will use Process decision program chart. So, option (A) is the correct answer.              |\n",
            "+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: What is the main topic or concept being discussed in this text?\n",
            "\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "+============================+==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The main topic being discussed in this text is about using process decision program charts (PDPC) for developing a chart to plot a course of action that includes many events or milestones.                                                                                                                                                                                                                                                                             |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The main concept being discussed in this text is the use of a \"Process decision program chart\" to develop a chart that plots out a course of action, including many events or milestones. This approach helps in planning and decision-making for complex projects by outlining potential steps and decisions. The text also indicates a confirmation that option A (presumably among multiple choices provided elsewhere) is the correct answer for a related question. |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The main topic being discussed in this handwritten text is the development of a chart to plot a course of action. Specifically, it mentions using a \"Process decision program chart\" to develop a chart that includes many events or milestones for a course of action. The text appears to be part of an answer or solution to a question, likely numbered 24, and it indicates that option A is the correct answer to this question.                                   |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The main topic being discussed in this text is a solution. The text reads \"Solution:\" at the top, indicating that what follows will present a solution or answer to some problem or question that was likely posed earlier.                                                                                                                                                                                                                                              |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | The solution involves developing a chart to plot a cruise of action, with many of the events or milestones being used as decision support. The text also states that \"Solution (a) is correct answer\", further confirming that the passage is focused on presenting a solution to something.                                                                                                                                                                             |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The main topic or concept being discussed in this text appears to be related to developing a process decision program chart or flowchart.                                                                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | The text mentions \"In developing a chart to plot a course of action, with many of the events or milestones, we will have Process Decision Program chart.\"                                                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            | This suggests that the discussion is focused on creating some kind of decision flowchart or process mapping technique that charts out different actions, events or milestones for a particular process or program.                                                                                                                                                                                                                                                       |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The main topic or concept being discussed in this text is a solution or approach to developing a chart to plot a course of action, with many milestones, in order to achieve a decision program. The text mentions \"Solution:\" and then goes on to describe this proposed approach.                                                                                                                                                                                      |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Identify any specific terms or phrases that appear to be key to understanding the content.\n",
            "\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                               |\n",
            "+============================+======================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The key terms or phrases in the content provided are:                                                                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | 1. Chart                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "|                            | 2. Plot a course of action                                                                                                                                                                                                                                                                                                                                                           |\n",
            "|                            | 3. Events or milestones                                                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            | 4. Process decision program chart                                                                                                                                                                                                                                                                                                                                                    |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The image shows a handwritten piece of text with some key terms that are crucial for understanding its content, particularly related to project management or process design. The terms include:                                                                                                                                                                                     |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | 1. **Chart to Plot a Course of Action** - This implies the creation of a visual representation to outline and follow a plan or strategy.                                                                                                                                                                                                                                             |\n",
            "|                            | 2. **Events or Milestones** - Referencing specific points or stages in a project or plan that mark significant moments or achievements.                                                                                                                                                                                                                                              |\n",
            "|                            | 3. **Process Decision Program Chart** - This is likely referring to a specific type of flowchart used in project management and organizational processes to enumerate decisions and actions based on different criteria or outcomes.                                                                                                                                                 |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | The phrase \"So, Option A is correct answer.\" indicates that this text is probably an explanation or justification for a certain choice or solution, possibly in an academic or training context.                                                                                                                                                                                     |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The key terms and phrases that appear to be important for understanding the content of this handwritten note are:                                                                                                                                                                                                                                                                    |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | 1. \"developing a chart\"                                                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            | 2. \"course of action\"                                                                                                                                                                                                                                                                                                                                                                |\n",
            "|                            | 3. \"events or milestones\"                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            | 4. \"Process decision program chart\"                                                                                                                                                                                                                                                                                                                                                  |\n",
            "|                            | 5. \"Option A is correct answer\"                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | These terms seem to be discussing a method for planning or decision-making, specifically mentioning the use of a chart to plot out actions, events, or milestones. The note also refers to a \"Process decision program chart\" as the likely tool being used. The last line indicates this is likely part of an answer key or explanation, as it states \"Option A is correct answer.\" |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The key phrases that appear central to understanding the content of this handwritten note are:                                                                                                                                                                                                                                                                                       |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | \"developing a chart to plot a cruise of action\"                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | \"milestones we will use Process decision program chart\"                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            | \"Abildson's (?) is correct answer\"                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | The note appears to outline a plan or process to develop some kind of chart, potentially called a \"Process decision program chart\", in order to plot a course of action involving milestones. The name \"Abildson\" (or a similar name, the handwriting is a bit hard to decipher) is referenced as having the \"correct answer\", likely in relation to this charting process.          |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | Based on the image, some key terms or phrases that appear relevant to understanding the content are:                                                                                                                                                                                                                                                                                 |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | 1. \"Solution\"                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            | 2. \"Developing a chart\"                                                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            | 3. \"Sequence of action\"                                                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            | 4. \"Milestones\"                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | 5. \"Process decision program chart\"                                                                                                                                                                                                                                                                                                                                                  |\n",
            "|                            | 6. \"Option (a) is correct answer\"                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | These terms suggest the context relates to developing some kind of process flow chart, sequence of actions, or decision program, potentially with milestones or key steps outlined. The mention of \"Option (a) is correct answer\" implies this may be part of a question or problem being solved.                                                                                    |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | Based on the image, some key terms and phrases that appear important for understanding the content are:                                                                                                                                                                                                                                                                              |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | - \"Solution\"                                                                                                                                                                                                                                                                                                                                                                         |\n",
            "|                            | - \"developing a chart to plot a course of action\"                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | - \"milestones\"                                                                                                                                                                                                                                                                                                                                                                       |\n",
            "|                            | - \"Decision program\"                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | - \"Option (A) is correct answer\"                                                                                                                                                                                                                                                                                                                                                     |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | These seem to be the main concepts or ideas being discussed in the context provided in the image.                                                                                                                                                                                                                                                                                    |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Describe the style and characteristics of the handwriting.\n",
            "\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "+============================+====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The handwriting style in the image can be described as follows:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 1. **Legibility**: The handwriting is quite legible and clear. Each letter is distinctly formed, making the text easy to read.                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 2. **Slant**: The letters have a slight rightward slant, giving the handwriting a forward motion feel.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 3. **Spacing**: There is consistent spacing between both letters and words, maintaining uniformity and readability.                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 4. **Letter Formation**:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n",
            "|                            |    - The capital letters are slightly larger and more decorated than the other letters, with some letters having loops (e.g., \"S\" in \"Solution\").                                                                                                                                                                                                                                                                                                                                                                                                                  |\n",
            "|                            |    - Lowercase letters are well-formed, with rounded shapes for letters like \"a,\" \"e,\" and \"o.\"                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            |    - The letters appear to have a mix of cursive and print styles, particularly in the connection between some letters.                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 5. **Size**: The handwriting size is medium, neither too large nor too small, which contributes to its legibility.                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 6. **Consistency**: The handwriting maintains a consistent style throughout, showing similar characteristics across all lines of text.                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | Overall, this handwriting appears neat, consistent, and easy to read, with a slight cursive influence.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The handwriting in the image exhibits several distinctive characteristics:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 1. **Script Style**: The handwriting is cursive but not consistently flowing, with breaks between letters within the same word. This provides a semi-connected appearance.                                                                                                                                                                                                                                                                                                                                                                                         |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 2. **Legibility**: Generally, the handwriting is reasonably legible, although the cursive style might pose reading challenges for some, especially in deciphering certain letters due to inconsistent looping and connecting strokes.                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 3. **Letter Formation**: Individual letters display variability in formation; for example, the letter 'e' varies significantly throughout. There are also tendencies for the ascenders (parts of letters that stretch upwards like 'l' and 'h') to be quite pronounced and looping.                                                                                                                                                                                                                                                                                |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 4. **Slant**: The text has a slight rightward slant, which is typical of right-handed cursive writing.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 5. **Spacing**: The spacing between words is uneven, with some words closely packed and others more spaced out. The spacing within words is also inconsistent, contributing to a somewhat disjointed appearance.                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 6. **Pressure and Line Quality**: The writing pressure seems uneven, visible from the variation in ink saturation and line thickness across the text. Some words are written with heavier pressure, making them more prominent than others.                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | This handwriting reveals a mix of hurriedness and an                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | The handwriting in the image has several notable characteristics:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 1. It's cursive style, with most letters connected to each other.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |\n",
            "|                            | 2. The writing has a slight rightward slant, which is common in cursive handwriting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n",
            "|                            | 3. The penmanship appears somewhat rushed or informal, as evidenced by the varying sizes of letters and occasional lack of consistent baseline.                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 4. Some letters, particularly the lowercase 'e', are formed in a distinctive looped style.                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n",
            "|                            | 5. The writing uses a mix of uppercase and lowercase letters, even within words (e.g., \"Process\" in the third line).                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n",
            "|                            | 6. There are some underlines for emphasis, such as under \"Solution:\" and the final statement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n",
            "|                            | 7. The handwriting is legible overall, but some words may require a bit more attention to read due to the quick, flowing style.                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 8. The ink appears to be from a black pen or marker, with consistent line thickness throughout.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | 9. There are minor variations in pressure, giving some parts of the text a slightly bolder appearance than others.                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | Overall, this handwriting style suggests a person who writes quickly and fluidly, likely someone accustomed to taking notes or writing                                                                                                                                                                                                                                                                                                                                                                                                                             |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | The handwriting in this image has a casual, slightly messy style. The letters are not perfectly formed or aligned, giving it a relaxed and informal appearance. Some key characteristics include:                                                                                                                                                                                                                                                                                                                                                                  |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | - A mix of cursive and print, with many letters connected but some printed separately                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |\n",
            "|                            | - Inconsistent letter sizes and uneven baselines                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | - Rounded letters like the lowercase \"a\" and \"o\"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | - A tendency to slant to the right                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | - Minimal spacing between words                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | - A squiggly line striking out a misspelled word                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n",
            "|                            | - Numbers written in a simple printed style                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n",
            "|                            | Overall, the penmanship looks like it was written quickly without great concern for neatness or uniformity. The combination of cursive and print is common in everyday handwriting. The imperfect letter formations contribute to a personal, unpolished aesthetic typical of notes jotted down during a meeting or brainstorming session.                                                                                                                                                                                                                         |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | The handwriting in the image appears to be cursive and somewhat messy or rushed. The letters are connected fluidly in a flowing style typical of cursive writing. However, the strokes seem a bit uneven and inconsistent, suggesting the writing was done relatively quickly without much careful formation. The slant of the letters also varies slightly throughout, adding to the somewhat untidy appearance. Overall, while clearly cursive, the handwriting has an informal and hurried character rather than being perfectly neat or calligraphic in style. |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | The handwriting in the image appears to be cursive and relatively loose in style, with some variations in letter size and slant. The writing has a somewhat informal, casual feel to it, without excessive neatness or rigidity. The letters are connected, giving the overall impression of a fluid, continuous flow of writing.                                                                                                                                                                                                                                  |\n",
            "+----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n",
            "\n",
            "Prompt: Is there any indication of the context or purpose of this written passage? If so, what is it?\n",
            "\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| Model                      | Output                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n",
            "+============================+=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+\n",
            "| gpt-4o                     | The written passage is providing a solution to a multiple-choice question (identified as \"Ans 24\"). The context appears to be related to a test or homework problem asking about the appropriate type of chart to develop in order to plot a course of action that includes various events and milestones. The solution indicates that the correct chart to use is a \"Process decision program chart,\" and it identifies \"Option A\" as the correct answer.                                                                                                                                                                                      |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| gpt-4-turbo                | The writing in the provided image appears to be a solution or an explanation for a specific type of chart used in planning or organizing a sequence of events or milestones. The passage describes the development of a chart to \"plot a course of action,\" and specifies that a \"Process decision program chart\" will be used. The context suggests that this could be part of an educational or instructional text, possibly related to project management, decision making, or process planning. The text also mentions \"Option A is the correct answer,\" indicating that it might be associated with a test, quiz, or educational exercise. |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-5-sonnet-20240620 | Yes, there are clear indications of the context and purpose of this written passage:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | 1. The word \"Solution:\" at the top suggests this is an answer or explanation to a question or problem.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | 2. The text refers to \"Ans 24).\", indicating this is likely the solution to question number 24 in some sort of test, quiz, or assignment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | 3. The content discusses \"developing a chart to plot a course of action\" and mentions using a \"Process decision program chart\", which suggests this is related to a question about project management or decision-making tools.                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | 4. The final line states \"So option (A) is correct answer.\", confirming this is indeed a solution to a multiple-choice question where option A was the right choice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | Given these elements, we can conclude that this passage is likely part of an answer key or solution guide for an educational assessment, probably in a subject related to project management, business processes, or decision-making techniques.                                                                                                                                                                                                                                                                                                                                                                                                |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-opus-20240229     | Based on the text in the image, this appears to be a solution to some kind of problem or question. The passage begins with the word \"Solution:\" and then describes developing a chart to plot a cruise of action, with many of the events or milestones listed using \"we will\" statements. It then states that \"Option (A) is correct answer\", further confirming this is likely a solution write-up, potentially for an academic assignment or test question.                                                                                                                                                                                  |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-sonnet-20240229   | Based on the content and phrasing of the written passage, it appears to be from an academic or instructional context, likely providing a solution or explanation related to developing some kind of chart or sequence of actions/events.                                                                                                                                                                                                                                                                                                                                                                                                        |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | The passage mentions \"developing a chart to plot a course of action\" and refers to \"milestones\" and a \"Process decision program chart.\" This terminology suggests it is discussing methods or steps for planning and visualizing a process or sequence, potentially as part of a curriculum or training program in areas like project management, process engineering, or a related field.                                                                                                                                                                                                                                                      |\n",
            "|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n",
            "|                            | While the exact purpose is not definitively stated, the academic/instructional framing and discussion of charting out a course of actions and milestones indicates this is likely an explanation, solution, or example related to some form of process mapping, planning, or flowcharting exercise or concept.                                                                                                                                                                                                                                                                                                                                  |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "| claude-3-haiku-20240307    | Based on the context provided in the written passage, this appears to be a solution or answer to a question or problem. The passage mentions \"Solution:\" at the beginning, indicating that the text that follows is intended to provide a solution or response to something. Without more information about the specific context or purpose, it's difficult to determine the exact nature of the problem or question being addressed. However, the passage suggests that it is providing a solution or decision-making process related to \"developing a chart to plot a course of action, with many of the events or milestones\" involved.      |\n",
            "+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n",
            "\n"
          ]
        }
      ]
    }
  ],
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}